home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / animutil / pvquan / giflib / gif_lib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-30  |  2.4 KB  |  62 lines

  1. /******************************************************************************
  2. * In order to make life a little bit easier when using the GIF file format,   *
  3. * this library was written, and which does all the dirty work...          *
  4. *                                          *
  5. *                    Written by Gershon Elber,  Jun. 1989  *
  6. *******************************************************************************
  7. * History:                                      *
  8. * 14 Jun 89 - Version 1.0 by Gershon Elber.                      *
  9. *  3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names). *
  10. ******************************************************************************/
  11.  
  12. #ifndef GIF_LIB_H
  13. #define GIF_LIB_H
  14.  
  15.  
  16. #include <stdio.h>
  17. #define GIF_LIB_VERSION    " Version 1.1, "
  18.  
  19. #define    GIF_ERROR    0
  20. #define GIF_OK        1
  21.  
  22. #ifndef TRUE
  23. #define TRUE        1
  24. #define FALSE        0
  25. #endif
  26.  
  27. typedef    int        GifBooleanType;
  28. typedef    unsigned char    GifPixelType;
  29. typedef unsigned char *    GifRowType;
  30. typedef unsigned char    GifByteType;
  31.  
  32. typedef enum {
  33.     UNDEFINED_RECORD_TYPE,
  34.     SCREEN_DESC_RECORD_TYPE,
  35.      IMAGE_DESC_RECORD_TYPE,                /* Begin with ',' */
  36.     EXTENSION_RECORD_TYPE,                   /* Begin with '!' */
  37.     TERMINATE_RECORD_TYPE                   /* Begin with ';' */
  38. } GifRecordType;
  39.  
  40. /******************************************************************************
  41. * O.k. here are the routines one can access in order to decode GIF file:      *
  42. * (GIF_LIB file DGIF_LIB.C).                              *
  43. ******************************************************************************/
  44.  
  45. FILE *    DGifOpenFile(char *GifFileName);
  46. void      DGifGetScreenDesc(int *Width, int *Height, int *ColorRes, int *BackGround,
  47.                 int *BitsPerPixel, unsigned char *palette);
  48. int       DGifGetRecordType(GifRecordType *GifType);
  49. void      DGifGetImageDesc(unsigned int *Left, unsigned int *Top, unsigned int *Width, unsigned int *Height, unsigned char *palette);
  50. void      DGifSetupDecompress(long size);
  51. int       DGifGetLine(GifPixelType *GifLine, int GifLineLen);
  52. void      DGifCloseFile(void);
  53.  
  54. int       EGifOpenFileName(char *FileName);
  55. void      EGifPutScreenDesc(int Width, int Height, int ColorRes, int BackGround,
  56.                 int BitsPerPixel, unsigned char ColorMap[][3]);
  57. void      EGifPutImageDesc(int Left, int Top, int Width, int Height, int BitsPerPixel);
  58. int       EGifPutLine(unsigned char *Line, int LineLen);
  59. void      EGifCloseFile(void);
  60.  
  61. #endif /* GIF_LIB_H */
  62.